package com.zzw.basic.fanxing;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class ErrorTest {

	static <T> void test(Collection<T> from,Collection<T> to){
		for(T ele:from){
			to.add(ele);
		}
	}
	
	static <T> void test2(Collection<? extends T> from,Collection<T> to){
		for(T ele:from){
			to.add(ele);
		}
	}
	
	
	public static void main(String[] args) {
		List<Object> l1 = new ArrayList<>();
		List<String> l2 = new ArrayList<>();
		//test(l1, l2);
		test2(l2,l1);
	}
}